home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 001 / addtrcol.arc / TRMCOL.DOC < prev   
Encoding:
Text File  |  1985-06-12  |  2.5 KB  |  67 lines

  1. TRIMCOL, version 1.3.
  2. Written by Walter Kennamer, 74025,514, 5/24/85.
  3.  
  4. TRIMCOL Extracts text between two columns (inclusive).  This program was
  5. designed to work in conjunction with other text utilities to provide a set
  6. of text operator primitives.  TRIMCOL can be used, for example, to add
  7. or delete fields in fixed length records.
  8.  
  9. USAGE: TRIMCOL -args input output
  10.   where args are:
  11.      f    Work as a filter (input and output are stdin and stdout).
  12.      bx   Extract beginning at column 'x' (default = 0)
  13.      ey   Extract ending at column 'y' (default = EOL)
  14.      rz   Extract ending at 'z' columns from end of line (default = 0)
  15.      ^    Negates other arguments.  For example, the argument string
  16.             -b5e10^ means "extract everything but the characters
  17.             between columns 5 and 10."
  18.  
  19. The input file must have a different name than the output file.  The input
  20. file is never changed.
  21.  
  22. Examples:
  23.  
  24. 1)     TRIMCOL -fb10e20 <input >output
  25.  
  26. instructs the program to work as a filter, extracting text
  27. between columns 10 and 20.
  28.  
  29. 2)     TRIMCOL -b2r1 input output
  30.  
  31. instructs the program to extract all but the first and last column
  32. from the input file, creating the output file.  If 'output' already exists,
  33. it will be overwritten.
  34.  
  35. 3)     TRIMCOL -b21e60^ input output
  36.  
  37. will extract all of the input file except columns 21 through 60.  This
  38. example deletes columns 21 through 60 (inclusive).
  39.  
  40. Restrictions and other notes
  41.  
  42. Lines cannot be longer than 1000 characters.
  43. All arguments are optional.
  44. Arguments can be entered in any order and in upper or lower case.
  45. Filenames cannot contain wildcards.
  46.  
  47. Filters
  48.  
  49. If the -f argument is entered, TRIMCOL will act as a filter, taking its
  50. input from stdin and writing its output to stdout.  You will normally want
  51. to redirect keyboard and console input and output when you select this
  52. option.  For example,
  53.  
  54.      TRIMCOL -fb10e20 <input >output
  55.  
  56. extracts columns 10 through 20 from input and writes them to output.  The
  57. redirection symbols ( '<' and '>' ) are important.  If you do not include
  58. them before your filenames, TRIMCOL will display an error message.  See your
  59. DOS manual if you are not familiar with filters.
  60.  
  61. If you use TRIMCOL as a filter, the input file must terminate with a
  62. <ctrl>Z or TRIMCOL will wait a very long time looking for one.  Output
  63. is guaranteed to terminate with a <ctrl>Z.  If you are not sure that
  64. your input file terminates with a <ctrl>Z, use the MARKEOF program to
  65. be safe.
  66.  
  67.